<template>
    <div>

      <div class="mt10" style=" display: flex;border-bottom: 1px solid #ebedf0;">
        <div class="blue_item" />
        <span class="font15" style="display: flex; line-height: 33px;margin-left:5px;  flex:1;">省侧行业信息</span>
      </div>
      <van-field readonly required name="industryBigTypeProvince" :value="fromdata.industryBigTypeProvince" label="省内行业大类：" label-width="7em" />
      <van-field readonly required name="industryBigTypeGroup" :value="fromdata.industryBigTypeGroup" label="集团行业大类：" label-width="7em" />
      <van-field readonly required name="industryMinTypeGroup" :value="fromdata.industryMinTypeGroup" label="集团行业小类：" label-width="7em" />
      <div class="mt10" style=" display: flex;border-bottom: 1px solid #ebedf0;">
        <div class="blue_item" />
        <span class="font15" style="display: flex; line-height: 33px;margin-left:5px;  flex:1;">一级DICT行业信息</span>
      </div>
      <van-field readonly required name="industryAttribution" :value="fromdata.industryAttribution" label="15大行业名称：" label-width="7.5em" />
      <van-field readonly required name="industryNameOneLevel" :value="fromdata.industryNameOneLevel" label="行业一级名称：" label-width="7em" />
      <van-field readonly required name="industryNameTwoLevel" :value="fromdata.industryNameTwoLevel" label="行业二级名称：" label-width="7em" />
      <!-- 融合能力甄别 -->
        <section-header v-if="showRHNLZB" :sectionTitle="'融合能力甄别：'" />
        <el-table v-if="showRHNLZB" :data="zhenbieData" :header-cell-style="{ textAlign: 'center' }"
            :cell-style="{ textAlign: 'center' }" border style="width: 100%">
            <el-table-column prop="onename" label="能力分类（一级）" width="100" />
            <el-table-column prop="twoname" label="能力分类（二级）" width="190" />
            <el-table-column prop="threename" label="能力分类（三级）" />
            <el-table-column prop="abilityName" label="能力提供方" />
            <el-table-column prop="abilityUser" label="甄别人" />
            <el-table-column prop="abilityOrg" label="甄别人组织" width="110" />
        </el-table>

        <!-- 售中售后阶段项目预定级维度 -->
      <section-header :sectionTitle="'售中售后阶段项目预定级维度'" />
      <!--        <div v-if="showSZSH">-->
      <van-field v-if="showSZSH" readonly required name="incomeAmount" :value="fromdata.incomeAmount" label="项目合同收入金额(万元):"
                 label-width="12em" />
      <van-field v-if="showSZSH" readonly required name="regionId" :value="fromdata.regionId" label="客户等级:" label-width="5em" />
      <van-field v-if="showSZSH" readonly required name="deliverComplex" :value="fromdata.deliverComplex" label="项目交付复杂度:" label-width="8em" :rules="[{ required: canEditSZSH, message: '请填写项目交付复杂度' }]" />
      <van-field v-if="showSZSH" readonly required name="complexItNrm" :value="fromdata.complexItNrm" label="自研收入占比:" label-width="6.5em" />
      <!--            <van-field readonly required name="complexItNrm" :value="fromdata.complexItNrm" label="项目财务净利润率:"-->
      <!--                label-width="9em" />-->
      <van-field readonly required name="autonomousImplemention" :value="fromdata.autonomousImplemention" label="是否自主实施:"
                 label-width="6.5em" />
      <van-field readonly required name="autImplementScope" :value="fromdata.autImplementScope" label="自主实施范围:"
                 label-width="6.5em" />
      <van-field v-if="showSZSH" readonly required name="autonomousImplementionType" :value="fromdata.autonomousImplementionType" label="项目自主实施类型:"
                 label-width="8.5em" />
      <van-field v-if="showSZSH" readonly required name="projectAutoLevel" :value="fromdata.projectAutoLevel" label="项目自主等级:"
                 label-width="6.5em" />
      <van-field v-if="showSZSH" readonly required name="selfPercent" :value="fromdata.selfPercent" label="自有业务占比:"
                 label-width="7em" />
      <!--        </div>-->

        <!-- 售中售后阶段项目预定级评分 -->
        <section-header v-if="showSZSH" :sectionTitle="'售中售后阶段项目预定级评分'" />
      <div v-if="showSZSH">
        <van-field readonly required name="onProjectGrade" :value="fromdata.onProjectGrade" label="售中售后阶段项目预定级评分:" label-width="13.5em" :rules="[{ required: canEditSZSH, message: '请填写售中售后阶段项目预定级评分' }]"/>
      </div>
        <!-- 能力信息 -->
        <section-header :sectionTitle="'能力信息'" />
        <div>
          <van-field readonly required name="abilityInformationState"
                     :value="mergeAbilityInfoMode.isAbilityInformationList" label="是否使用中台能力:" label-width="9em" />
          <van-field v-if="mergeAbilityInfoMode.isAbilityInformationList=='是'" readonly required label="能力名称:" label-width="5em" />
          <el-table v-if="mergeAbilityInfoMode.isAbilityInformationList=='是'&&mergeAbilityInfoMode.abilityInformationLists" :data="mergeAbilityInfoMode.abilityInformationLists"
                    :header-cell-style="{ textAlign: 'center' }" :cell-style="{ textAlign: 'center' }" border
                    style="width: 100%">
            <el-table-column prop="mustAbilityName" label="必融能力名称" width="130" />
            <el-table-column prop="abilityName" label="能力名称" width="150" />
            <el-table-column prop="abilityCode" label="能力编码" />
            <el-table-column prop="abilityProvider" label="能力提供方" />
            <el-table-column prop="isReusable" label="是否复用" />
            <el-table-column prop="cannotManyCauseReason" label="无法复用必融能力原因" width="170"/>
            <el-table-column prop="burdenOfProof" label="无法使用必融能力举证" width="170"/>
          </el-table>
          <van-field readonly required name="isAbilityInfoZt"
                     :value="mergeAbilityInfoMode.isAbilityInfoZt" label="是否使用中台非必融能力:" label-width="12em" />
          <van-field v-if="mergeAbilityInfoMode.isAbilityInfoZt=='是'" readonly required label="能力名称:" label-width="5em" />
          <el-table v-if="mergeAbilityInfoMode.isAbilityInfoZt=='是'&&mergeAbilityInfoMode.abilityInfoZts" :data="mergeAbilityInfoMode.abilityInfoZts"
                    :header-cell-style="{ textAlign: 'center' }" :cell-style="{ textAlign: 'center' }" border
                    style="width: 100%">
            <el-table-column prop="abilityProvider" label="必融能力名称" width="130" />
            <el-table-column prop="abilityName" label="能力名称" width="150" />
            <el-table-column prop="abilityCode" label="能力编码" />
          </el-table>
          <van-field readonly required name="isBigDataProductsList"
                     :value="mergeAbilityInfoMode.isBigDataProductsList" label="是否使用大数据产品:" label-width="10em" />
          <van-field v-if="mergeAbilityInfoMode.isBigDataProductsList=='是'" readonly required label="产品名称:" label-width="5em" />
          <el-table v-if="mergeAbilityInfoMode.isBigDataProductsList=='是'&&mergeAbilityInfoMode.bigDataProductsLists" :data="mergeAbilityInfoMode.bigDataProductsLists"
                    :header-cell-style="{ textAlign: 'center' }" :cell-style="{ textAlign: 'center' }" border
                    style="width: 100%">
            <el-table-column prop="firstClassProductName" label="一级产品名称" width="130" />
            <el-table-column prop="productClass" label="产品分类" width="150" />
            <el-table-column prop="maProductName" label="产品名称" />
            <el-table-column prop="tariffCode" label="资费代码" />
            <el-table-column prop="billingMode" label="计费模式" />
          </el-table>
          <van-field readonly required name="abilityPrecipitate" :value="mergeAbilityInfoMode.abilityPrecipitate"
                     label="是否沉淀中台能力:" label-width="9em" />
          <van-field v-if="mergeAbilityInfoMode.abilityPrecipitate=='是'" readonly required name="abilityName" :value="mergeAbilityInfoMode.abilityName"
                     label="能力名称:" label-width="5em" />
          <van-field v-if="mergeAbilityInfoMode.abilityPrecipitate=='是'" readonly required autosize type="textarea" rows="1"
                     name="abilityIntroduce" :value="mergeAbilityInfoMode.abilityIntroduce" label="能力介绍:" label-width="5em" />

          <van-field readonly required name="isSolutionPlanInfoZt"
                     :value="mergeAbilityInfoMode.isSolutionPlanInfoZt" label="是否使用中台解决方案:" label-width="11em" />
          <van-field v-if="mergeAbilityInfoMode.isSolutionPlanInfoZt=='是'" readonly required label="产品名称:" label-width="5em" />
          <el-table v-if="mergeAbilityInfoMode.isSolutionPlanInfoZt=='是'&&mergeAbilityInfoMode.solutionPlanInfoZts" :data="mergeAbilityInfoMode.solutionPlanInfoZts"
                    :header-cell-style="{ textAlign: 'center' }" :cell-style="{ textAlign: 'center' }" border
                    style="width: 100%">
            <el-table-column prop="solutionProviderName" label="解决方案提供方" width="130" />
            <el-table-column prop="solutionName" label="解决方案名称" width="150" />
            <el-table-column prop="solutionCode" label="解决方案编码" />
          </el-table>
        </div>

        <!-- 预立项信息 -->
        <section-header :sectionTitle="'预立项信息：'" />
        <van-field readonly required name="projectEstablishName" :value="fromdata.projectEstablishName" label="立项项目名称:"
            label-width="7em" />
        <van-field readonly name="projectEstablishNumber" :value="fromdata.projectEstablishNumber" label="立项项目编码:"
            label-width="7em" />


        <!-- 收入拆分表 -->
        <section-header :sectionTitle="'收入拆分表：'" />
        <el-table :data="srcfbData" :header-cell-style="{ textAlign: 'center' }" :cell-style="{ textAlign: 'center' }"
            border style="width: 100%">
            <el-table-column prop="splitBusinessType" label="业务大类" width="120" />
            <el-table-column prop="splitSujectName" label="收入科目名称" width="190" />
            <el-table-column prop="splitSujectCode" label="科目代码" />
            <el-table-column prop="splitTaxRate" label="税率(%)" />
            <el-table-column prop="isUniversal" label="是否属于通服收入" width="140" />
            <el-table-column prop="splitIncludedAmount" label="含税总金额（元）" width="150" />
            <el-table-column prop="splitNoAmount" label="不含税金额（元）" width="150" />
            <el-table-column prop="splitTaxAmount" label="税额（元）" width="150" />
            <el-table-column prop="paymentType" label="出账类型" />
            <el-table-column prop="billingTime" label="计费时长（月）" width="120" />
            <el-table-column prop="contractPhase" label="合同约定计费阶段" width="140" />
            <el-table-column prop="abilityLogo" label="自有能力标识" width="190" />
            <el-table-column prop="entrustedSalesAccount" label="是否受托代销科目" width="140" />
        </el-table>


        <!-- 收款计划 -->
        <section-header :sectionTitle="'收款计划：'" />
        <el-table :data="skjhData" :header-cell-style="{ textAlign: 'center' }" :cell-style="{ textAlign: 'center' }" border
            style="width: 100%">
            <el-table-column prop="paymentStage" label="收付款阶段" width="120" />
            <el-table-column prop="paymentRatio" label="收付款比例(%)" width="140" />
            <el-table-column prop="paymentLimit" label="含税收付款额度(元)" width="150" />
            <el-table-column prop="advanceDate" label="预计收付款年月" width="120" />
        </el-table>


        <!-- 支出拆分表 -->
        <section-header :sectionTitle="'支出拆分表：'" />
        <el-table :data="zccfbData" :header-cell-style="{ textAlign: 'center' }" :cell-style="{ textAlign: 'center' }"
            border style="width: 100%">
            <el-table-column prop="splitBusinessType" label="业务大类" width="130" />
            <el-table-column prop="splitSujectName" label="支出科目名称" width="190" />
            <el-table-column prop="splitSujectCode" label="科目代码" width="130" />
            <el-table-column prop="splitTaxRate" label="税率(%)" />
            <el-table-column prop="isUniversal" label="是是否属于通服支出" width="150" />
            <el-table-column prop="splitIncludedAmount" label="含税总金额（元）" width="150" />
            <el-table-column prop="splitNoAmount" label="不含税金额（元）" width="150" />
            <el-table-column prop="splitTaxAmount" label="税额（元）" width="150" />
            <el-table-column prop="paymentType" label="计提类型" />
            <el-table-column prop="billingTime" label="计提时长（月）" width="120" />
            <el-table-column prop="contractPhase" label="合同约定支出阶段" width="190" />
        </el-table>
        <div v-if="fromdata.entrustedSalesModel=='是'">
          <section-header :sectionTitle="'收入拆分表（支出拆分）：'" />
          <el-table :data="srcfzcData" :header-cell-style="{ textAlign: 'center' }" :cell-style="{ textAlign: 'center' }"
              border style="width: 100%">
              <el-table-column prop="splitBusinessType" label="业务大类" width="130" />
              <el-table-column prop="splitSujectName" label="收入科目名称" width="190" />
              <el-table-column prop="splitSujectCode" label="科目代码" width="130" />
              <el-table-column prop="splitTaxRate" label="税率(%)" />
              <el-table-column prop="isUniversal" label="是是否属于通服支出" width="150" />
              <el-table-column prop="splitIncludedAmount" label="含税总金额（元）" width="150" />
              <el-table-column prop="splitNoAmount" label="不含税金额（元）" width="150" />
              <el-table-column prop="splitTaxAmount" label="税额（元）" width="150" />
              <el-table-column prop="paymentType" label="出账类型" />
              <el-table-column prop="billingTime" label="计提时长（月）" width="120" />
              <el-table-column prop="contractPhase" label="合同约定支出阶段" width="190" />
              <el-table-column prop="isAbilityLogo" label="是否融自由能力" width="190" />
              <el-table-column prop="abilityLogo" label="自由能力名称" width="190" />
              <el-table-column prop="entrustedSalesAccount" label="是否受托代销项目" width="190" />
          </el-table>
        </div>
        

        <!-- 付款计划 -->
        <section-header :sectionTitle="'付款计划：'" />
        <el-table :data="fkjhData" :header-cell-style="{ textAlign: 'center' }" :cell-style="{ textAlign: 'center' }" border
            style="width: 100%">
            <el-table-column prop="paymentStage" label="收付款阶段" width="120" />
            <el-table-column prop="paymentRatio" label="收付款比例(%)" width="140" />
            <el-table-column prop="paymentLimit" label="含税收付款额度(元)" width="150" />
            <el-table-column prop="advanceDate" label="预计收付款年月" width="120" />
        </el-table>
        <div v-if="fromdata.entrustedSalesModel=='是'">
          <!-- 付款计划 -->
          <section-header :sectionTitle="'收款计划（支出拆分）：'" />
          <el-table :data="skjhzcData" :header-cell-style="{ textAlign: 'center' }" :cell-style="{ textAlign: 'center' }" border
              style="width: 100%">
              <el-table-column prop="paymentStage" label="收付款阶段" width="120" />
              <el-table-column prop="paymentRatio" label="收付款比例(%)" width="140" />
              <el-table-column prop="paymentLimit" label="含税收付款额度(元)" width="150" />
              <el-table-column prop="advanceDate" label="预计收付款年月" width="120" />
          </el-table>
        </div>
        
        <!-- 效益前评估 -->
        <section-header :sectionTitle="'效益前评估：'" />
        <div>
            <van-field readonly required name="estimateCost" :value="fromdata.estimateCost" label="估算成本(万元):"
                label-width="8.5em" />
            <!-- 项目规模类型 ‘大单项目’ 这个位置显现 -->
            <van-field v-if="fromdata.projectScaleType == '大单项目'" readonly required name="excellentOrder"
                :value="fromdata.excellentOrder" label="是否为优单:" label-width="6em" />
            <van-field readonly required name="itNpvRateReview" :value="fromdata.itNpvRateReview" label="IT部分净现值率自评结果(%):"
                label-width="13em" />
            <van-field readonly required name="lowestQuotation" :value="fromdata.lowestQuotation" label="含税预估最低报价(万元):"
                label-width="12em" />
            <van-field readonly required name="highExpenditure" :value="fromdata.highExpenditure" label="含税预估最高支出(万元):"
                label-width="12em" />
            <van-field readonly required name="lowestQuotationNoTax" :value="fromdata.lowestQuotationNoTax"
                label="不含税预估最低报价(万元):" label-width="13em" />
            <van-field readonly required name="highExpenditureNoTax" :value="fromdata.highExpenditureNoTax"
                label="不含税预估最高支出(万元):" label-width="13em" />
            <van-field readonly required name="wholeCooperationPeriod" :value="fromdata.wholeCooperationPeriod"
                label="项目整体合作期(年):" label-width="10.5em" />
            <van-field readonly required name="itCooperationPeriod" :value="fromdata.itCooperationPeriod"
                label="IT部分合作期(年):" label-width="10em" />
            <van-field readonly required name="estimateIncome" :value="fromdata.estimateIncome" label="估算收益(%):"
                label-width="7.25em" />
            <van-field readonly required name="projectGrossMargin" :value="fromdata.projectGrossMargin" label="项目毛利率(%):"
                label-width="8.25em" />
            <van-field readonly required name="itGrossProfitRate" :value="fromdata.itGrossProfitRate" label="IT部分毛利率(%):"
                label-width="9.75em" />
            <van-field readonly required name="wholeNpv" :value="fromdata.wholeNpv" label="项目整体净现值(元):"
                label-width="10.5em" />
            <van-field readonly required name="wholeNpvRate" :value="fromdata.wholeNpvRate" label="项目整体净现值率(%):"
                label-width="11.25em" />
            <van-field readonly required name="wholePaybackPeriod" :value="fromdata.wholePaybackPeriod" label="项目整体回收期(月):"
                label-width="10.5em" />
            <van-field readonly required name="itNpvRate" :value="fromdata.itNpvRate" label="IT部分净现值率(%):"
                label-width="10.75em" />
            <van-field readonly required name="itNpv" :value="fromdata.itNpv" label="IT部分净现值(元):" label-width="10em" />
            <van-field readonly required name="itPaybackPeriod" :value="fromdata.itPaybackPeriod" label="IT部分回收期(年):"
                label-width="10em" />
            <van-field readonly required name="insideEffectivenessRate" :value="fromdata.insideEffectivenessRate"
                label="内部收益率(%):" label-width="8.25em" />
            <van-field readonly required name="wholeGrossProfitRate" :value="fromdata.wholeGrossProfitRate"
                label="项目整体毛利率(%):" label-width="10.25em" />
            <van-field readonly required name="decisionLevel" :value="fromdata.decisionLevel" label="决策层级:"
                label-width="5em" />

            <!-- 决策层级 控制它是否显隐 -->
<!--            <van-field v-if="showProvinceSupport" readonly required name="provinceSupport" :value="fromdata.provinceSupport"-->
<!--                label="省公司审核处室:" label-width="8em" />-->


            <van-field v-if="showDecisionSummaryFileList" :required="location =='dict.hkLeadToCityLead'" readonly name="decisionSummaryFileList" label="预研究决策纪要："
                label-width="8em" center>
                <template #button v-if="canUploadDecisionSummaryFileList">
                    <van-uploader :after-read="file2server">
                        <van-button size="small" type="primary" color="#0f85cf">上传附件</van-button>
                    </van-uploader>
                </template>
            </van-field>
            <div v-for="(fileitem, index2) in fromdata.decisionSummaryFileList" :key="fileitem.id"
                style="margin-left: 20px">
                <div readonly class="font14 fileLink" style="color: #0f85cf">
                    <a target="_blank" @click="openFileUrlfun(fileitem.anonymousFilePath)">{{ fileitem.fileName }}</a>
                </div>
                <van-icon v-if="canUploadDecisionSummaryFileList" name="close" color="#ea0023" size="20"
                    @click="deleteFile(index2)" />
            </div>
        </div>


        <!-- 空白格 -->
        <van-field label-width="10em" readonly label=" " class="lyy-width" input-align="left" placeholder="" />
        <van-field label-width="10em" readonly label=" " class="lyy-width" input-align="left" placeholder="" />

    </div>
</template>
 

<script>
import SectionHeader from '../sztdzj/sztdzjDetail/section-header.vue'
import { mapGetters } from 'vuex';
import { uploadFileCommon } from "@/api/dictapi";

export default {
    data() {
        return {

            // zFromdata:{},

            srcfbData: [],  /// 收入拆分表
            skjhData: [],   /// 收款计划   
            zccfbData: [],  /// 支出拆分表
            fkjhData: [],   /// 付款计划
            srcfzcData: [],  /// 收入拆分表（支出拆分）
            skjhzcData:[]  /// 收款计划表（支出拆分）
        }
    },

    props: ['fromdata', 'zhenbieData', 'location', 'pmInsType', 'todoType','mergeAbilityInfoMode'],
    methods: {

        openFileUrlfun(value) {
            this.$router.push(
                {
                    name: 'fileview',
                    query: {
                        openFileUrl: openFileUrl(value)
                    }
                }
            );
        },

        file2server(file) {
            let fileData = new FormData();
            fileData.append("pmInsType", this.pmInsType);
            fileData.append("pmInsTypePart", "1");
            fileData.append("files", file.file);

            let params = new Map();
            params.pmInsType = this.pmInsType;
            params.pmInsTypePart = '1';
            params.userName = this.user.userName;
            uploadFileCommon(fileData, params).then((res) => {
                if (!res.data) {
                    Notify(res.message);
                    return;
                }
                if (res.data.data) {
                    if (this.fromdata.decisionSummaryFileList === null) {
                        this.fromdata.decisionSummaryFileList = [];
                    }
                    this.fromdata.decisionSummaryFileList.push(res.data.data.sysFiles[0]);
                }
            });
        },

        deleteFile(index) {
            Dialog.confirm({ title: "提示", message: "是否删除此附件？" })
                .then(() => {
                    this.fromdata.handleFile.splice(index, 1);
                })
                .catch(() => { });
        },

        /// 对数据进行操作
        configFromData() {

            /// 收入拆分
            var incomeDataList = JSON.parse(JSON.stringify(this.fromdata.incomeDataList))
            if (incomeDataList != null && incomeDataList.length > 0) {

                var incomeDataListDict = incomeDataList[0].IT;
                if (incomeDataListDict != null) {

                    this.srcfbData = incomeDataListDict.splitList;
                    const srcfbDict = this.getTotalData(incomeDataListDict.splitList, ['splitIncludedAmount', 'splitNoAmount', 'splitTaxAmount'], 'splitBusinessType');
                    this.srcfbData.push(srcfbDict);

                    this.skjhData = incomeDataListDict.payeeList;
                    const skjhDict = this.getTotalData(incomeDataListDict.payeeList, ['paymentRatio', 'paymentLimit'], 'paymentStage');
                    this.skjhData.push(skjhDict);
                }
            }

            /// 支出拆分
            var outcomeDataList = JSON.parse(JSON.stringify(this.fromdata.outcomeDataList));
            if (outcomeDataList != null) {

                var outcomeDataListDict = outcomeDataList[0];
                if (outcomeDataListDict != null) {

                    this.zccfbData = outcomeDataListDict.splitList;
                    const zccfbDict = this.getTotalData(outcomeDataListDict.splitList, ['splitIncludedAmount', 'splitNoAmount', 'splitTaxAmount'], 'splitBusinessType');
                    this.zccfbData.push(zccfbDict);

                    this.fkjhData = outcomeDataListDict.payeeList;
                    const fkjhDict = this.getTotalData(outcomeDataListDict.payeeList, ['paymentRatio', 'paymentLimit'], 'paymentStage');
                    this.fkjhData.push(fkjhDict);
                    if(this.fromdata.entrustedSalesModel=='是'){
                      this.srcfzcData = outcomeDataListDict.outIncomeList;
                      const srcfzcDict = this.getTotalData(outcomeDataListDict.outIncomeList, ['splitIncludedAmount', 'splitNoAmount', 'splitTaxAmount'], 'splitBusinessType');
                      this.srcfzcData.push(srcfzcDict);

                      this.skjhzcData = outcomeDataListDict.outPayeeList;
                      const skjhzcDict = this.getTotalData(outcomeDataListDict.outPayeeList, ['paymentRatio', 'paymentLimit'], 'paymentStage');
                      this.skjhzcData.push(skjhzcDict);
                    }
                }
            }
        },

        /// 获取一个数据(合计 总计)
        getTotalData(originData, keys, totalKey) {

            const dict = {};
            dict[totalKey] = '合计';
            if (Array.isArray(originData) && Array.isArray(keys)) {

                for (let key of keys) {

                    const num = 0;
                    for (let originDict of originData) {

                        const str = originDict[key] ? originDict[key] : '0';
                        const num_str = parseFloat(str);
                        num = num + num_str;
                    }

                    const fixedNum = num.toFixed(2);
                    dict[key] = fixedNum.toString();
                }

            } else {
                console.log("⭕️⭕️⭕️ 参数错误：必须是两个数组");
            }

            return dict;
        },

        getNewFromdata(key) {

            return this.fromdata[key];
        }

    },


    // watch: {
    //     fromdata: {

    //         handler() {
    //             //这是vue的规定写法，当你watch的值发生变化的时候，就会触发这个handler，这是vue内部帮你做的事情
    //             console.log('changeFromdata list changed')
    //             this.$emit('freshData', this.fromdata)
    //         },
    //         deep: true,  // 可以深度检测到 obj 对象的属性值的变化
    //         immediate: true //刷新加载  立马触发一次handler
    //     },
    // },

    created() {

    },

    computed: {
        ...mapGetters(["userinfo"]),
        ...mapGetters(["user"]),

        // 售中售后模块 可编辑
        canEditSZSH(){

            return false;
            // return this.todoType && (this.location == 'dict.toStart' || this.location == 'dict.cityLeadToCityDeliveryAdmin' || this.location == 'dict.leadershipToDelivery');
        },

        // 售中售后模块 展示
        showSZSH(){
           
            return this.location == 'dict.cityLeadToCityDeliveryAdmin'
                || this.location == 'dict.cityDeliveryAdminToCityAdmin'
                || this.location == 'dict.toStart'
                || this.location == 'dict.leadershipToDelivery'
                || this.location == 'dict.supportSpecial'
                || this.location == 'dict.supportSpecialLeader'
                || this.location == 'dict.specialToIndustryAdmin'
                || this.location == 'dict.cityAdminToLead'
                || this.location == 'dict.industryAdminToProvincialAdmin'
                || this.location == 'dict.provincialAdminToAgree'
                || this.location == 'dict.agree'
                || this.location == 'dict.noAgree'
                || this.location == 'dict.industryAdminToProvincialCompany';
        },

        // 流转中展示预研究决策纪要
        showDecisionSummaryFileList() {
            return this.location && this.location != "dict.startToHkLead" && this.userinfo.belongCompanyTypeDictValue != "03";
        },

        canUploadDecisionSummaryFileList() {
            return this.showDecisionSummaryFileList && this.location != 'dict.start'&& this.todoType;
        },

        /// 省公司审核处室
        showProvinceSupport() {
            if (this.fromdata.decisionLevel == '地市分管副总签批决策' ||
                this.fromdata.decisionLevel == '地市总办会决策') {
                return false;
            }
            else {
                return true;
            }
        },

        showRHNLZB() {
            return true;
            // return this.zhenbieData && this.zhenbieData.length > 0 && !this.isZQ;
        },

        /// 直签、投标
        isZQ() {

            return this.fromdata.competeType == '直签';
        },
    },

    components: {
        SectionHeader

    },
}
</script>
 
<style lang="scss" scoped></style>
